/**
 * @version 1.0.0
 * @Title: MidiDeviceProvider
 * @Package: lx.music.sound.midi.spi
 * @Description: Copyright: Copyright (c) 2016
 * @Company: 成都壹柒互动科技有限公司
 * @author huangzhilong.hzl
 * @date 2017-11-02 13:13
 */
package lx.music.sound.midi.spi;

import lx.music.sound.midi.MidiDevice;

/**
 * @version 1.0.0
 * @Title: MidiDeviceProvider
 * @Package: lx.music.sound.midi.spi
 * @Description: Copyright: Copyright (c) 2016
 * @Company: 成都壹柒互动科技有限公司
 * @author huangzhilong.hzl
 * @date 2017-11-02 13:13
 */
public abstract class MidiDeviceProvider {

    public boolean isDeviceSupported(MidiDevice.Info info){
        MidiDevice.Info infos[] = getDeviceInfo() ;
        for (int i=0;i<infos.length;i++){
            if(info.equals(infos[i])){
                return true ;
            }
        }
        return false ;
    }

    public abstract MidiDevice.Info[] getDeviceInfo() ;

    public abstract MidiDevice getDevice(MidiDevice.Info info) ;

}
